package com.itheima.d6_object_stream;

import org.apache.commons.io.FileUtils;

import java.io.*;

/*
  目标：掌握对象字节输入流的使用：反序列化对象。
 */
public class Test2ObjectInputStream {
    public static void main(String[] args) throws Exception {

        ObjectInputStream ois=new ObjectInputStream(new FileInputStream("aaa.txt"));
        try{
            while(true){
                Student student = (Student)ois.readObject();
                System.out.println(student.getName()+":"+student.getPassword()+student.getNickName());
            }
        }catch (IOException e){


            System.out.println();

        }

        ois.close();

    }
    static void show(){

    }

}
